#include <iostream>
#include <cmath>
using namespace std;

const int N = 30;
long long dp[N][N];

int main()
{
    int n, m;
    int x, y;
    cin >> n >> m >> x >> y;

    dp[1][0] = 1;
    x++, y++;

    for (int i = 1; i <= n + 1; i++)
        for (int j = 1; j <= m + 1; j++)
        {
            if (abs(i - x) + abs(j - y) == 3 && i != x && j != y || (i == x && j == y)) continue;
            dp[i][j] = dp[i - 1][j] + dp[i][j - 1];
        }

    cout << dp[n + 1][m + 1];

    return 0;
}
